home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 80 / CD Actual 80 Julio-Agosto 2003.iso / Linux / LinuxGazette / lg / issue15 / source / example-4a.rib < prev    next >
Encoding:
Text File  |  2002-08-14  |  1.0 KB  |  43 lines

  1. #########################################
  2. # Working Example 1b for Linux Gazette
  3. # By Paul M. Sargent (8th Feb 1997)
  4. #########################################
  5.  
  6. # First we setup the output file 
  7. Display "Example_1b.tiff" "file" "rgb"
  8.  
  9. # Then set the x & y resolution of the image and the pixel aspect
  10. # ratio (1 = square pixels)
  11. Format 300 300 1
  12.  
  13. # We now setup the camera (projection type and field of view)
  14. Projection "perspective" "fov" 20
  15.  
  16. # Move the camera into position
  17. Identity
  18. Translate 0 0 10
  19.  
  20. # Start Describing the Scene
  21. WorldBegin
  22.  
  23. # Add the Lightsources
  24.   LightSource "spotlight" 1 "from" [1 3 -4] "to" [0 0 0] "intensity" 15
  25.   LightSource "spotlight" 1 "from" [-4 4 -1] "to" [0 0 0] "intensity" 15
  26.   
  27. # Start our first object
  28.     Sphere 1 1 -1 360
  29.  
  30. # Put a Floor in.
  31.     Patch "bilinear" "P" [-5 -1 -10  
  32.                            5 -1 -10  
  33.                 -5 -1  5  
  34.                5 -1  5]
  35. # And a Back Wall  
  36.     Patch "bilinear" "P" [-5  10  5 
  37.                            5  10  5  
  38.                 -5 -1   5  
  39.                5 -1   5]
  40. # Finished
  41. WorldEnd
  42.  
  43.